﻿using System.Configuration;


namespace Tilver.Configuration.Logging
{
    public class CategoryCollection : ConfigurationElementCollection
    {
        /// <summary>
        /// 生成新的配置节
        /// </summary>
        /// <returns></returns>
        protected override ConfigurationElement CreateNewElement()
        {
            return new CategoryElement();
        }
        /// <summary>
        /// 返回指定配置节的名称
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((CategoryElement)element).Name;
        }
        /// <summary>
        /// 返回指定名称的配置节信息
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public new CategoryElement this[string name]
        {
            get { return (CategoryElement)BaseGet(name); }
        }
        
    }
}
